Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly handle a list of type geo in json (#2482) #2485

Merged
merged 2 commits into from
Aug 14, 2018

Conversation

commesan
Copy link
Contributor

@commesan commesan commented Jul 12, 2018

When adding a list of geo types in a json string, the geojson string was being parsed as a list of connecting entities. I've added a check for geojson in the handling of the []map[string]interface{} case.

Updated the list test to include a list of geojson.


This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2018

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a TODO to consolidate the common logic to parse Geo into a function? Also, did you run tests to ensure that it doesn't affect anything else?

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@commesan
Copy link
Contributor Author

Sure, can add the function myself to parse the geo or add the TODO. Ran all tests, nothing broke.

@commesan
Copy link
Contributor Author

Updated branch with a handleGeoType function that is being called for the single geo object and list of geo objects.

@manishrjain
Copy link
Contributor

Thanks for your contribution!

@manishrjain manishrjain merged commit b1eb212 into dgraph-io:master Aug 14, 2018
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
…io#2485)

* Correctly handle list of type geo in json (dgraph-io#2482)

* Add handleGeoType function for handling a geotype or list of geotype (dgraph-io#2482)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants